package org.moka.ioio.ioiopilot.input;

public abstract class AbstractInput implements InputInterface{

	public volatile int[] value;
	
	public AbstractInput(int numChannels)
	{
		value = new int[numChannels];
	}
	
	@Override
	public void validate() {
		for(int i=0; i<value.length; i++)
		{
			if(value[i]>MAX_VALUE) value[i] = MAX_VALUE;
			else if(value[i]<MIN_VALUE) value[i] = MIN_VALUE;
		}
	}
}
